<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Vue初体验</title>
    <script src="../js/vue.js"></script>
    <style>
        .first {
            color:green
        }
        .second {
            font-size: 100px;
        }
    </style>
</head>
<body>
    <div id="app">
        <div :class="{first:isFirst,second:isSecond}">{{msg}}</div>
        <p>hahaha{{age}}</p>
        <p v-html="text">hhhh</p>
        <button :click="btnClick">click</button>
    </div>
</body>
<script>
    var vm = new Vue({
        el:'#app',
        data:{
            msg:'Shane',
            age:10,
            name:null,
            text:"<h1>XIE</h1>",
            size:100,
            color:"blue",
            isFirst:true,
            isSecond:true
        },
        methods:{
            btnClick:function(){
                this.isFirst = !this.isFirst;
                console.log(isFirst);
            }
        }
    });
    console.log(vm.$data.msg)
    console.log(vm.msg);
    vm.age = 12
</script>
</html>